// import VueX from 'vuex'
import VueX from './myvuex'
import Vue from 'vue'
Vue.use(VueX)
// const A = {
//   namespaced: true,
//   state: {
//     name: "zhufneg"
//   },
//   mutations: {
//     changeName(state, option) {
//       state.name = option
//     }
//   }
// }
let store = new VueX.Store({
  state: {
    count: 1000
  },
  mutations: {
    changeCount(state, option) {
      console.log(this)
      // setTimeout(() => {
      state.count += option
      // }, 2000);
    }
  },
  actions: {
    changeCount(store, option) {
      setTimeout(() => {
        store.commit('changeCount', option)
      }, 1000);
    }
  },
  modules: {
    // A
  }
})
export default store